import instance from './axios.js'
const baseUrl = 'http://www/123.com'
import urlObj from './url.js'

// Object.keys(urlObj).forEach((key) => {
// 	urlObj[key] = `${baseUrl}/${urlObj[key]}`
// })

// console.log(urlObj);

let ajax = {
    //登录
    getCode: (params) => instance.get(urlObj.loginUrl.getCode,params),
    sendMessage: (params) => instance.get(urlObj.loginUrl.sendMessage,params),
    login: (params) => instance.post(urlObj.loginUrl.login,params),
    getUserList: (params) => instance.get(urlObj.loginUrl.getUserList,params),
    putPwd: (params) => instance.put(urlObj.loginUrl.putPwd,params),
    checkPhone: (params) => instance.get(urlObj.loginUrl.checkPhone,params),
    createUser: (params) => instance.post(urlObj.loginUrl.crudUser,params),
    editUser: (params) => instance.post(urlObj.loginUrl.crudUser,params),
    deleteUser: (params) => instance.delete(urlObj.loginUrl.crudUser,params),
    getUser: (params) => instance.get(urlObj.loginUrl.crudUser,params),

    //我的
	submitPerson: (params) => instance.post(urlObj.personUrl.getPersonList, params)
}

export default ajax
